stemmer
A pretty fast version of the Porter stemming algorithm.
Check out wooorm/stmr.c for an even faster version
Installation
npm:
$ npm install stemmer
Component.js:
$ component install wooorm/stemmer
Bower:
$ bower install stemmer
Duo:
var stemmer = require('wooorm/stemmer');
Usage
var stemmer = require('stemmer');
stemmer("considerations");
stemmer("detestable");
stemmer("vileness");
CLI
Install:
npm install --global stemmer
Use:
Usage: stemmer [options] <words...>
A pretty fast implementation of the Porter Stemmer algorithm
Options:
-h, --help output usage information
-v, --version output version number
Usage:
# output stems
$ stemmer considerations
# consider
# output stems from stdin
$ echo "detestable vileness" | stemmer
# detest vile
Benchmark
On a MacBook Air, it runs about 688,000 op/s.
stemmer — this module
688 op/s » op/s * 1,000
porterStemmer
372 op/s » op/s * 1,000
natural - fails on 558 out of 23532 unit tests
63 op/s » op/s * 1,000
License
MIT @ Titus Wormer